import request from '@/utils/request'

const api_name = '/api/user/patient'

export default{
    //获得就诊人列表方法
    findAll(){
        return request({
            url:`${api_name}/auth/findAll`,
            method:'get'
        })
    },

    //添加就诊人方法
    savePatient(patient){
        return request({
            url:`${api_name}/auth/save`,
            method:'post',
            data:patient
        })
    },

    //修改就诊人方法
    update(patient){
        return request({
            url:`${api_name}/auth/update`,
            method:'put',
            data:patient
        })
    },

    //删除就诊人方法
    delete(id){
        return request({
            url:`${api_name}/auth/remove/${id}`,
            method:'delete'
        })
    },

    //根据id查询就诊人信息方法
    findById(id){
        return request({
            url:`${api_name}/auth/getById/${id}`,
            method:'get'
        })
    }
}